#!/usr/bin/python
# -*- coding:utf-8 -*-

import gevent

def worker_1():
    print('worker_1 start')
    gevent.sleep(1)
    print('worker_1 done')

def worker_2():
    print('worker_2 start')
    gevent.sleep(2)
    print('worker_2 done')

def main():
    gevent.joinall([
        gevent.spawn(worker_1),
        gevent.spawn(worker_2),
    ])

if __name__ == '__main__':
    main()
